]> dgit.raspbian.org Git - gnome-shell.git/commit
keyboard: Unset current page when it gets destroyed
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 9 May 2019 19:30:21 +0000 (14:30 -0500)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 9 May 2019 20:07:54 +0000 (15:07 -0500)
commitc0c2edf2e1162bb36ad93ab015a64b7dedbd7cec
treeeb967f67ca12a1a178720370588d93694ad189cf
parentde0c3251dd4040c86c350dfdd68e9acdb98f208d
keyboard: Unset current page when it gets destroyed

The current page is going to be destroyed as part of _onKeyboardGroupsChanged
cleanup, however we don't unset its pointer, and thus we'd might try to call a
function using an invalidated pointer.

So, unset the this._current_page reference when its get destroyed, connecting
to destroy signal when setting it and disconnecting when changing page.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1281

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/540
js/ui/keyboard.js